<template>
  <div>
    <div v-if="dialogVisible">
      <el-dialog title="信息确认并提交" :visible.sync="dialogVisible" width="700px">
        <div>
          <div v-for="(item, i) in systemGuifanFilesProcessList" :key="i">
            <div>
              <b>
                管理信息
                <span v-if="systemGuifanFilesProcessList.length > 1">({{ index + 1 }})</span>
              </b>
            </div>
            <table class="table1 owntable mb20 tableLayout" border="0" cellspacing="0" cellpadding="1" style="width: 100%;">
              <tr>
                <td style="width: 150px;">反馈投诉管理编号</td>
                <td>{{ item.number }}</td>
                <td style="width: 150px;">反馈投诉名称</td>
                <td>{{ item.feedbackName }}</td>
              </tr>
              <tr>
                <td>反馈投诉类别</td>
                <td>{{ item.feedbackType == 0 ? '体系运行' : '医疗器械' }}</td>
                <td>反馈投诉日期</td>
                <td>{{ item.feedbackDate }}</td>
              </tr>
              <tr v-if="item.feedbackType == 1">
                <td>生产批号</td>
                <td>{{ item.batchNumber }}</td>
                <td>产品名称</td>
                <td>{{ item.productName }}</td>
              </tr>
              <tr v-if="item.feedbackType == 1">
                <td>规格型号</td>
                <td>{{ item.productSku }}</td>
                <td>产品代码</td>
                <td>{{ item.productCode }}</td>
              </tr>
              <tr>
                <td>管理部门</td>
                <td>{{ item.manageDeptName }}</td>
                <td>负责人</td>
                <td>{{ item.manageUserName }}</td>
              </tr>
              <tr>
                <td>编制部门</td>
                <td colspan="3">{{ item.createDeptName }}</td>
              </tr>
            </table>

            <preview-file :detail="item"></preview-file>
          </div>
          <preview-process-record :guifanFilesProcessRecordList="guifanFilesProcessRecordList"></preview-process-record>

          <div class="pub_center"><el-button size="small" type="primary" @click.once="close()">提交</el-button></div>
        </div>
      </el-dialog>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    type: String,
    guifanFilesProcessRecordList: [],
    systemGuifanFilesProcessList: []
  },
  data() {
    return {
      dialogVisible: false
    };
  },
  methods: {
    init() {
      this.dialogVisible = true;
    },
    close() {
      this.$emit('close');
    }
  }
};
</script>

<style scoped="scoped">
.table1 {
  margin-bottom: 20px;
}

table {
  width: 660px;
}
</style>
